
import { getToken, setToken, removeToken } from '@/utils/auth'
import { resetRouter } from '@/router'
import  {getHospitalDetail} from "@/api/zhuyanre";


const state = {
    patientinfo:{},

}

const mutations = {
 
    set_patientinfo:(state, data)=> {
        state.patientinfo = data
    },
 
  
}

const actions = {


  //药库库存管理详情
  getInfo({ commit }, d){
    return new Promise((resolve, reject) => {
        getHospitalDetail(d).then((res)=>{
         
            if (res.code === 200 && res.data) {
              commit('set_patientinfo', res.data)
          
              resolve(res)
           
          } else {
              commit('set_patientinfo', {})
              resolve()
          }
      })
    })
  },
  
 
 

 
}

export default {
  namespaced: true,
  state,
  mutations,
  actions
}

